from Inspect.models import Equipments
from Inspect import db

class equipmentsCountroller:
    def addEquipment(**kwargs):
        equipmentName = kwargs["equipmentName"]
        position = kwargs["position"]
        equipmentNumber = kwargs["equipmentNumber"]
        longitude = kwargs["longitude"]
        latitude = kwargs["latitude"]
        obj = Equipments(equipmentName=equipmentName,position=position,equipmentNumber=equipmentNumber,longitude=longitude,latitude=latitude)
        db.session.add(obj)
        db.session.commit()
        return {
            "code":"200",
            "msg":"ok"
        }